package cn.neusoft.mapper;

import cn.neusoft.domain.*;
import cn.neusoft.query.BaseQuery;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface InvoiceMapper {
  void invoiceRegister(Invoice invoice);//登记发票
  void invoiceUsage(Invoice invoice);//领用发票
  Integer findInvoiceID();//查询需要修改的发票号
  Task findUsageInfo(String task_id);//根据任务单号查询发票领用相关信息
  Invoice findIfUsage(String invoice_task_id);//判断任务单是否已开过发票
  void returnInvoice(Invoice invoice);//退回发票，设置status为3，并清空相关信息
  void discardInvoice(Invoice invoice);//废弃发票，设置status为4，并添加废弃原因
  List<Invoice> findByPage(BaseQuery query);//分页查询

  Integer findReInvoice();//查询可领用发票的数量
  Integer findHaveInvoice();//查询已领用发票的数量
  Integer findDiscardInvoice();//查询废弃发票的数量
  Integer findReturnInvoice();//查询被退回发票的数量

  List<Commodity> findCommodity();//查询商品
  Customer findCustomerByID(String customer_id); //根据客户ID查询客户
  Supplier findSupplier(String supplier_id);//根据供应商ID查找供应商
  InvoicePdf findPdf(InvoicePdf invoicePdf);//查找pdf路径

}
